package com.cap.dreamcircle.Utils;

import com.cap.dreamcircle.App.App;

import java.util.LinkedHashSet;
import java.util.Set;

import cn.jpush.android.api.JPushInterface;
import cn.jpush.android.api.TagAliasCallback;

/**
 * Created by liucxu on 2018/3/19.
 */

public class JPushUtils {

    public static void RegisterJpush() {
        Set<String> tagSet = new LinkedHashSet<String>();
        JPushInterface.setAliasAndTags(App.GetInstance(), PreferenceUtils.GetUserId(), tagSet, new TagAliasCallback() {
            @Override
            public void gotResult(int i, String s, Set<String> set) {

            }
        });
    }

    public static void UnRegisterJpush() {
        Set<String> tagSet = new LinkedHashSet<String>();
        JPushInterface.setAliasAndTags(App.GetInstance(), "", tagSet, new TagAliasCallback() {
            @Override
            public void gotResult(int i, String s, Set<String> set) {

            }
        });
    }
}
